package gemini.castor.ui.client.page.content.office.news.form;

import gemini.castor.ui.client.constants.I18nConstants;

import com.google.gwt.core.client.GWT;
import com.google.gwt.uibinder.client.UiBinder;
import com.google.gwt.uibinder.client.UiField;
import com.google.gwt.uibinder.client.UiTemplate;
import com.google.gwt.user.client.ui.Composite;
import com.google.gwt.user.client.ui.HTML;
import com.google.gwt.user.client.ui.Image;
import com.google.gwt.user.client.ui.Panel;
import com.google.gwt.user.client.ui.Widget;

public class NewsFormView extends Composite implements
		NewsFormPresenter.Display {

	@UiTemplate("NewsFormView.ui.xml")
	interface MyUiBinder extends UiBinder<Panel, NewsFormView> {
	}

	private static final MyUiBinder binder = GWT.create(MyUiBinder.class);
	private I18nConstants constants;

	public NewsFormView() {
		initWidget(binder.createAndBindUi(this));
		constants = GWT.create(I18nConstants.class);
	}

	@UiField
	Image imgMagazine;
	
	@UiField
	HTML htmMagazine;

	@Override
	public Widget asWidget() {
		return this;
	}

	@Override
	public void loadData() {
		imgMagazine.setUrl("images/logo/Today149_usen_130.jpg");
		htmMagazine.setHTML(constants.htmMagazineDetail());
	}
}
